package com.qianfeng.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qianfeng.pojo.Dept;
import com.qianfeng.service.DeptService;

@Controller
public class DeptController {
  
	@Autowired
	private DeptService deptService;
	
	@RequestMapping("/savedept")
	@ResponseBody
	public String save() {
		Dept dept= new Dept();
		dept.setName("葫芦玩");
		deptService.saveDept(dept);
		return "successed";
	}
	
}
